﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OopMethod
{
    internal class Car
    {
        public Car() { }

        public Car(string type)
        {
            Type = type;
        }

        public string Type { get; set; }

        public string Year { get; set; }

        public void ShowInfo()
        {
            Console.WriteLine($"{this.Type}:{this.Year}");
        }

        public string OutInfo()
        {
            string info = $"{Type}:{Year}";
            return info;
        }

        public void HasParamNoRet(int start)
        {
            start += 100;
            Console.WriteLine($"{start}");
        }

        public int HasParamHasRet(int start)
        {
            return start += 100;
        }

        public Tyre[] TyreArray() {
            Tyre t1 = new Tyre(1);
            Tyre t2 = new Tyre(2);
            Tyre t3 = new Tyre(3);
            Tyre t4 = new Tyre(4);

            Tyre[] Tyres = new Tyre[4];
            Tyres[0] = t1;
            Tyres[1] = t2;
            Tyres[2] = t3;
            Tyres[3] = t4;
            return Tyres;
        }

        public Engine GetEngine() { 
            Engine engine= new Engine("ea888");
            return engine;
        
        }

        public void ShowInfo2(int a, string[] info) {
            foreach (var item in info)
            {
                Console.WriteLine(item);
            }

        }

        public void ShowInfo3(int a,  params string[] info)
        {
            foreach (var item in info)
            {
                Console.WriteLine(item);
            }

        }
    }
}

